package com.reborn.mall.api.controller;

import com.reborn.mall.api.model.dto.HomeAdvertiseDTO;
import com.reborn.mall.api.model.entity.HomeAdvertise;
import com.reborn.mall.api.service.HomeAdvertiseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO: Here is description
 *
 * @author Reborn
 * @since 2020/4/30
 */
@RestController
@RequestMapping("/marketing/advertise")
public class HomeAdvertiseController extends BaseController<HomeAdvertise> {

    @Autowired
    private HomeAdvertiseService homeAdvertiseService;

    @PostMapping("/create")
    public HomeAdvertise create(@ModelAttribute HomeAdvertiseDTO homeAdvertiseDTO) {
        return homeAdvertiseService.create(homeAdvertiseDTO);
    }
}
